home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-06-06 | 1.1 KB | 55 lines |
- DESTDIR=/usr/skunk
- #
- # Makefile for GNU e?grep
- #
- CC = cc
-
- # Add -DUSG for System V.
- CFLAGS = -O -DUSG -Dsco
-
- TARGET= grep egrep
- SRCS= dfa.c regex.c alloca.c
-
- #
- # You may add getopt.o if your C library lacks getopt(); note that
- # 4.3BSD getopt() is said to be somewhat broken.
- #
- # Add alloca.o if your machine does not support alloca().
- #
- OBJS = dfa.o regex.o alloca.o
- GOBJ = grep.o
- EOBJ = egrep.o
-
- # Space provided for machine dependent libraries.
- LIBS =
-
- all: regress grep.1
-
- regress: egrep grep
- cd tests; sh regress.sh
-
- egrep: $(OBJS) $(EOBJ)
- $(CC) $(CFLAGS) -o egrep $(OBJS) $(EOBJ) $(LIBS)
-
- egrep.o: grep.c
- rm -f egrep.c; cp grep.c egrep.c
- $(CC) $(CFLAGS) -DEGREP -c egrep.c
- rm -f egrep.c
-
- grep: $(OBJS) $(GOBJ)
- $(CC) $(CFLAGS) -o grep $(OBJS) $(GOBJ) $(LIBS)
-
- install: $(TARGET) inst-man
- scoinst -s grep $(DESTDIR)/bin/gnugrep
- scoinst -s egrep $(DESTDIR)/bin/gnuegrep
-
- clobber clean:
- rm -f grep egrep *.o core tests/core tests/tmp.script \
- tests/khadafy.out egrep.c
-
- inst-man:
- scoinst -c -m 444 grep.1 $(DESTDIR)/man/man.1/gnugrep.1
-
- dfa.o egrep.o grep.o: dfa.h
- egrep.o grep.o regex.o: regex.h
-